package com.richard.base.net.model.api

import com.ks.component.net.NetConstants
import com.richard.base.net.bean.DeviceIdBean
import com.richard.base.net.bean.KsResponse
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.Headers
import retrofit2.http.POST

/**
 ***************************************
 * 项目名称:base
 * @Author guanhuawei
 * 邮箱：guanhuawei@ksjgs.com
 * 创建时间: 2020/3/4     10:14 AM
 * 用途: deviceId 生成
 * 用协程重新写。
 ***************************************

 */
interface DeviceIdService {

    /**
     * 获取deviceid
     * @param requestBody RequestBody
     * @return KsResponse<SessionTokenDeviceIdBean>
     */
    @Headers(NetConstants.HeaderContentTypeLong)
    @POST("/pangu/user/device/deviceId")
    suspend fun getDeviceId(@Body requestBody: RequestBody): KsResponse<DeviceIdBean>


    /**
     *
     * @param jsonString
     * @return
     */
    @Headers(NetConstants.HeaderContentTypeLong)
    @POST("/pangu/device/save/android")
    suspend fun uploadDeviceOtherParams(@Body jsonString: RequestBody?): KsResponse<Any>


    @Headers(NetConstants.HeaderContentTypeLong)
    @POST("/pangu/user/device/init")
    suspend fun requestDeviceInitialize(@Body requestBody: RequestBody): KsResponse<DeviceIdBean>

}